Skip to content

🧪 Add tests for PublishAgentsCommand#26

Merged
juzaweb merged 4 commits intomasterfrom
tests/publish-agents-command-3206696916718738454
Mar 17, 2026
Merged

🧪 Add tests for PublishAgentsCommand#26
juzaweb merged 4 commits intomasterfrom
tests/publish-agents-command-3206696916718738454

Conversation

@juzaweb
Copy link
Copy Markdown
Owner

@juzaweb juzaweb commented Mar 17, 2026

Add unit tests for the PublishAgentsCommand to improve codebase reliability.

  • Covered publishing all folders vs specific scopes (--skills, --rules).
  • Validated overwrite confirmation prompts and --force flag.
  • Validated errors when the source directory does not exist.
  • Implemented file system mocking using Mockery to maintain environment-agnostic tests and to avoid disk modifications during testing.

PR created automatically by Jules for task 3206696916718738454 started by @juzaweb

- Mock Illuminate\Filesystem\Filesystem for tests
- Test all publish scopes and overwrite confirmations
- Move test file to correct Commands directory

Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 3 commits March 17, 2026 14:14
- Replaced `File::makeDirectory` inside tests with Mockery expectations.
- Removed destructive side-effects affecting the repository's `agents/` folder.
- Fixed namespace/path issue by properly moving the file to `tests/Unit/Commands/PublishAgentsCommandTest.php`.

Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
- Ensure branch only contains the tests/Unit/Commands/PublishAgentsCommandTest.php test file.
- Removed all dummy/temporary file modifications to agents/ rules and skills directories.
- Full mocking of Illuminate\Filesystem\Filesystem is retained to prevent disk operations and permission issues during CI.

Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
- Moved test file from tests/Unit/Commands to tests/Unit.
- Updated namespace from Juzaweb\DevTool\Tests\Unit\Commands to Juzaweb\DevTool\Tests\Unit to match directory structure.
- Adjusted the baseSourcePath calculation to account for the new directory depth.

Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com>
@juzaweb juzaweb merged commit 249986e into master Mar 17, 2026
2 checks passed
@juzaweb juzaweb deleted the tests/publish-agents-command-3206696916718738454 branch March 17, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant